FROM golang:1.20-alpine AS build

ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64

WORKDIR /app

COPY ../.. .

RUN go mod tidy && go build -o main .


FROM alpine:latest

WORKDIR /app

COPY --from=build /app/main .

EXPOSE 8082

ENTRYPOINT ["./main"]
